import kotlinx.coroutines.*

fun main(args: Array<String>) {
    runBlocking {
        val job = launch(CoroutineName("Job1")) {
            println("job1 scope: $this")
            println("job1 scope context: $coroutineContext")
            println("job1 ${coroutineContext[Job]}")
            println("job1 ${coroutineContext[CoroutineName]}")
        }

        val job2 = launch(CoroutineName("Job2")) {
            println("job2 scope: $this")
            println("job2 scope context: $coroutineContext")
            println("job2 ${coroutineContext[Job]}")
            println("job2 ${coroutineContext[CoroutineName]}")
        }

        job2.children

        println("job1: $job")
        println("job2: $job2")

//        withContext(Dispatchers.Unconfined) {
//
//        }
    }
}